import request from '@/utils/request'

// 查询建筑物类型树
export function treeBuildingType (query) {
  return request({
    url: '/building/BuildingType/tree',
    method: 'get',
    params: query
  })
}

// 查询建筑物类型列表
export function listBuildingType (query) {
  return request({
    url: '/building/BuildingType/list',
    method: 'get',
    params: query
  })
}

// 查询建筑物类型列表（排除节点）
export function listBuildingTypeExcludeChild (deptId) {
  return request({
    url: '/building/BuildingType/list/exclude/' + deptId,
    method: 'get'
  })
}

// 查询建筑物类型详细
export function getBuildingType (id) {
  return request({
    url: '/building/BuildingType/' + id,
    method: 'get'
  })
}

// 新增建筑物类型
export function addBuildingType (data) {
  return request({
    url: '/building/BuildingType',
    method: 'post',
    data: data
  })
}

// 修改建筑物类型
export function updateBuildingType (data) {
  return request({
    url: '/building/BuildingType',
    method: 'put',
    data: data
  })
}

// 删除建筑物类型
export function delBuildingType (id) {
  return request({
    url: '/building/BuildingType/' + id,
    method: 'delete'
  })
}